<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
/   -------------------------------------------------------------------------------
/   class Transaction
/   ------------------------------------------------------------------------------- 
/   @author alen boby <alenboby@gmail.com> 
/	Purpose: collect all SSP ajax used for datatables
/ 
/
*/
class Data_login extends CI_Controller {

   public function __construct()
  {
    parent::__construct();
		$this->load->library('session');
		$this->load->library('form_validation');
		$this->load->library('encrypt');
		$this->load->library('enc');
        $this->load->model('mmaster');
        $this->load->model('mglobal');
		$this->load->model('mitem');
		$this->load->model('Mdata_login');
		$this->is_logged_in();
  }

	function is_logged_in()
	{
		$is_logged_in = $this->session->userdata('is_logged_in');
		if(!isset($is_logged_in) || $is_logged_in != true)
		{
			redirect(base_url() .'index.php/login');
		}		
	}

function tampil_login_logout(){
	$this->load->model('Mdata_login');

	//echo $data['hasil'];
	$data['template']       = "shell/smooth";
	$data['main_view']      = "f-data_login-logout";
	$this->load->view($data['template'],$data);
	/*$aColumns = array('Region','Cluster','NIK');
    $dummyColumns = array('Region','Cluster','NIK');
    $sIndexColumn = "NIK";
    $sTable = "t_rpt_activity_real_time";
    $this->_doSSP($aColumns,$sIndexColumn,$sTable,$dummyColumns,'','',true,true);*/
  }
  function read(){
  	$data = $this->Mdata_login->mtampil_login_logout();
	echo json_encode($data);
  }
  
}